home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / firetrap.c < prev    next >
C/C++ Source or Header  |  2000-05-04  |  17KB  |  505 lines

  1. /***************************************************************************
  2.  
  3. Fire Trap memory map (preliminary)
  4.  
  5. driver by Nicola Salmoria
  6.  
  7. Z80:
  8. 0000-7fff ROM
  9. 8000-bfff Banked ROM (4 banks)
  10. c000-cfff RAM
  11. d000-d7ff bg #1 video/color RAM (alternating pages 0x100 long)
  12. d000-dfff bg #2 video/color RAM (alternating pages 0x100 long)
  13. e000-e3ff fg video RAM
  14. e400-e7ff fg color RAM
  15. e800-e97f sprites RAM
  16.  
  17. memory mapped ports:
  18. read:
  19. f010      IN0
  20. f011      IN1
  21. f012      IN2
  22. f013      DSW0
  23. f014      DSW1
  24. f015      from pin 10 of 8751 controller
  25. f016      from port #1 of 8751 controller
  26.  
  27. write:
  28. f000      IRQ acknowledge
  29. f001      sound command (also causes NMI on sound CPU)
  30. f002      ROM bank selection
  31. f003      flip screen
  32. f004      NMI disable
  33. f005      to port #2 of 8751 controller (signal on P3.2)
  34. f008-f009 bg #1 y scroll
  35. f00a-f00b bg #1 x scroll
  36. f00c-f00d bg #2 y scroll
  37. f00e-f00f bg #2 x scroll
  38.  
  39. interrupts:
  40. VBlank triggers NMI.
  41. the 8751 triggers IRQ
  42.  
  43. 6502:
  44. 0000-07ff RAM
  45. 4000-7fff Banked ROM (2 banks)
  46. 8000-ffff ROM
  47.  
  48. read:
  49. 3400      command from the main cpu
  50.  
  51. write:
  52. 1000-1001 YM3526
  53. 2000      ADPCM data for the MSM5205 chip
  54. 2400      bit 0 = to sound chip MSM5205 (1 = play sample); bit 1 = IRQ enable
  55. 2800      ROM bank select
  56.  
  57.  
  58. 8751:
  59. Who knows, it's protected. The bootleg doesn't have it.
  60.  
  61. ***************************************************************************/
  62.  
  63. #include "driver.h"
  64. #include "vidhrdw/generic.h"
  65. #include "cpu/m6502/m6502.h"
  66.  
  67.  
  68.  
  69. extern unsigned char *firetrap_bg1videoram,*firetrap_bg2videoram;
  70. extern unsigned char *firetrap_videoram,*firetrap_colorram;
  71. extern unsigned char *firetrap_scroll1x,*firetrap_scroll1y;
  72. extern unsigned char *firetrap_scroll2x,*firetrap_scroll2y;
  73. extern size_t firetrap_bgvideoram_size;
  74. extern size_t firetrap_videoram_size;
  75. WRITE_HANDLER( firetrap_bg1videoram_w );
  76. WRITE_HANDLER( firetrap_bg2videoram_w );
  77. WRITE_HANDLER( firetrap_flipscreen_w );
  78. int firetrap_vh_start(void);
  79. void firetrap_vh_stop(void);
  80. void firetrap_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  81. void firetrap_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  82.  
  83.  
  84. static int firetrap_irq_enable = 0;
  85.  
  86. WRITE_HANDLER( firetrap_nmi_disable_w )
  87. {
  88.     interrupt_enable_w(offset,~data & 1);
  89. }
  90.  
  91. WRITE_HANDLER( firetrap_bankselect_w )
  92. {
  93.     int bankaddress;
  94.     unsigned char *RAM = memory_region(REGION_CPU1);
  95.  
  96.  
  97.     bankaddress = 0x10000 + (data & 0x03) * 0x4000;
  98.     cpu_setbank(1,&RAM[bankaddress]);
  99. }
  100.  
  101. READ_HANDLER( firetrap_8751_r )
  102. {
  103. //logerror("PC:%04x read from 8751\n",cpu_get_pc());
  104.  
  105.     /* Check for coin insertion */
  106.     /* the following only works in the bootleg version, which doesn't have an */
  107.     /* 8751 - the real thing is much more complicated than that. */
  108.     if ((readinputport(2) & 0x70) != 0x70) return 0xff;
  109.     else return 0;
  110. }
  111.  
  112. WRITE_HANDLER( firetrap_8751_w )
  113. {
  114. logerror("PC:%04x write %02x to 8751\n",cpu_get_pc(),data);
  115.     cpu_cause_interrupt(0,0xff);
  116. }
  117.  
  118. static WRITE_HANDLER( firetrap_sound_command_w )
  119. {
  120.     soundlatch_w(offset,data);
  121.     cpu_cause_interrupt(1,M6502_INT_NMI);
  122. }
  123.  
  124. static WRITE_HANDLER( firetrap_sound_2400_w )
  125. {
  126.     MSM5205_reset_w(offset,~data & 0x01);
  127.     firetrap_irq_enable = data & 0x02;
  128. }
  129.  
  130. WRITE_HANDLER( firetrap_sound_bankselect_w )
  131. {
  132.     int bankaddress;
  133.     unsigned char *RAM = memory_region(REGION_CPU2);
  134.  
  135.  
  136.     bankaddress = 0x10000 + (data & 0x01) * 0x4000;
  137.     cpu_setbank(2,&RAM[bankaddress]);
  138. }
  139.  
  140. static int msm5205next;
  141.  
  142. void firetrap_adpcm_int (int data)
  143. {
  144.     static int toggle=0;
  145.  
  146.     MSM5205_data_w (0,msm5205next>>4);
  147.     msm5205next<<=4;
  148.  
  149.     toggle ^= 1;
  150.     if (firetrap_irq_enable && toggle)
  151.         cpu_cause_interrupt (1, M6502_INT_IRQ);
  152. }
  153.  
  154. WRITE_HANDLER( firetrap_adpcm_data_w )
  155. {
  156.     msm5205next = data;
  157. }
  158.  
  159. static struct MemoryReadAddress readmem[] =
  160. {
  161.     { 0x0000, 0x7fff, MRA_ROM },
  162.     { 0x8000, 0xbfff, MRA_BANK1 },
  163.     { 0xc000, 0xe97f, MRA_RAM },
  164.     { 0xf010, 0xf010, input_port_0_r },
  165.     { 0xf011, 0xf011, input_port_1_r },
  166.     { 0xf012, 0xf012, input_port_2_r },
  167.     { 0xf013, 0xf013, input_port_3_r },
  168.     { 0xf014, 0xf014, input_port_4_r },
  169.     { 0xf016, 0xf016, firetrap_8751_r },
  170.     { 0xf800, 0xf8ff, MRA_ROM },    /* extra ROM in the bootleg with unprotection code */
  171.     { -1 }    /* end of table */
  172. };
  173.  
  174. static struct MemoryWriteAddress writemem[] =
  175. {
  176.     { 0x0000, 0xbfff, MWA_ROM },
  177.     { 0xc000, 0xcfff, MWA_RAM },
  178.     { 0xd000, 0xd7ff, firetrap_bg1videoram_w, &firetrap_bg1videoram, &firetrap_bgvideoram_size },
  179.     { 0xd800, 0xdfff, firetrap_bg2videoram_w, &firetrap_bg2videoram },
  180.     { 0xe000, 0xe3ff, MWA_RAM, &firetrap_videoram, &firetrap_videoram_size },
  181.     { 0xe400, 0xe7ff, MWA_RAM, &firetrap_colorram },
  182.     { 0xe800, 0xe97f, MWA_RAM, &spriteram, &spriteram_size },
  183.     { 0xf000, 0xf000, MWA_NOP },    /* IRQ acknowledge */
  184.     { 0xf001, 0xf001, firetrap_sound_command_w },
  185.     { 0xf002, 0xf002, firetrap_bankselect_w },
  186.     { 0xf003, 0xf003, firetrap_flipscreen_w },
  187.     { 0xf004, 0xf004, firetrap_nmi_disable_w },
  188. //    { 0xf005, 0xf005, firetrap_8751_w },
  189.     { 0xf008, 0xf009, MWA_RAM, &firetrap_scroll1y },
  190.     { 0xf00a, 0xf00b, MWA_RAM, &firetrap_scroll1x },
  191.     { 0xf00c, 0xf00d, MWA_RAM, &firetrap_scroll2y },
  192.     { 0xf00e, 0xf00f, MWA_RAM, &firetrap_scroll2x },
  193.     { -1 }    /* end of table */
  194. };
  195.  
  196. static struct MemoryReadAddress sound_readmem[] =
  197. {
  198.     { 0x0000, 0x07ff, MRA_RAM },
  199.     { 0x3400, 0x3400, soundlatch_r },
  200.     { 0x4000, 0x7fff, MRA_BANK2 },
  201.     { 0x8000, 0xffff, MRA_ROM },
  202.     { -1 }    /* end of table */
  203. };
  204.  
  205. static struct MemoryWriteAddress sound_writemem[] =
  206. {
  207.     { 0x0000, 0x07ff, MWA_RAM },
  208.     { 0x1000, 0x1000, YM3526_control_port_0_w },
  209.     { 0x1001, 0x1001, YM3526_write_port_0_w },
  210.     { 0x2000, 0x2000, firetrap_adpcm_data_w },    /* ADPCM data for the MSM5205 chip */
  211.     { 0x2400, 0x2400, firetrap_sound_2400_w },
  212.     { 0x2800, 0x2800, firetrap_sound_bankselect_w },
  213.     { 0x4000, 0xffff, MWA_ROM },
  214.     { -1 }    /* end of table */
  215. };
  216.  
  217.  
  218.  
  219. INPUT_PORTS_START( firetrap )
  220.     PORT_START    /* IN0 */
  221.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP | IPF_4WAY )
  222.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN | IPF_4WAY )
  223.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT | IPF_4WAY )
  224.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_4WAY )
  225.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP | IPF_4WAY )
  226.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN | IPF_4WAY )
  227.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT | IPF_4WAY )
  228.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT | IPF_4WAY )
  229.  
  230.     PORT_START    /* IN1 */
  231.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP | IPF_4WAY | IPF_COCKTAIL )
  232.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN | IPF_4WAY | IPF_COCKTAIL )
  233.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT | IPF_4WAY | IPF_COCKTAIL )
  234.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_4WAY | IPF_COCKTAIL )
  235.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP | IPF_4WAY | IPF_COCKTAIL )
  236.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN | IPF_4WAY | IPF_COCKTAIL )
  237.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT | IPF_4WAY | IPF_COCKTAIL )
  238.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT | IPF_4WAY | IPF_COCKTAIL )
  239.  
  240.     PORT_START      /* IN2 */
  241.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
  242.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
  243.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  244.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
  245.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 )    /* bootleg only */
  246.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )    /* bootleg only */
  247.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )    /* bootleg only */
  248.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
  249.  
  250.     PORT_START      /* DSW0 */
  251.     PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
  252. //    PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  253. //    PORT_DIPSETTING(    0x01, DEF_STR( 1C_1C ) )
  254. //    PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
  255.     PORT_DIPSETTING(    0x07, DEF_STR( 1C_1C ) )
  256.     PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
  257.     PORT_DIPSETTING(    0x05, DEF_STR( 1C_3C ) )
  258.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
  259.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_6C ) )
  260.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) )
  261.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  262.     PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) )
  263.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  264.     PORT_DIPSETTING(    0x18, DEF_STR( 1C_1C ) )
  265.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
  266.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  267.     PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
  268.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )
  269.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  270.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  271.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
  272.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  273.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  274.  
  275.     PORT_START      /* DSW1 */
  276.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
  277.     PORT_DIPSETTING(    0x02, "Easy" )
  278.     PORT_DIPSETTING(    0x03, "Normal" )
  279.     PORT_DIPSETTING(    0x01, "Hard" )
  280.     PORT_DIPSETTING(    0x00, "Hardest" )
  281.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  282.     PORT_DIPSETTING(    0x00, "1" )
  283.     PORT_DIPSETTING(    0x0c, "3" )
  284.     PORT_DIPSETTING(    0x08, "4" )
  285.     PORT_DIPSETTING(    0x04, "5" )
  286.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) )
  287.     PORT_DIPSETTING(    0x30, "50000 70000" )
  288.     PORT_DIPSETTING(    0x20, "60000 80000" )
  289.     PORT_DIPSETTING(    0x10, "80000 100000" )
  290.     PORT_DIPSETTING(    0x00, "50000" )
  291.     PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
  292.     PORT_DIPSETTING(    0x00, DEF_STR( No ) )
  293.     PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
  294.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  295. INPUT_PORTS_END
  296.  
  297.  
  298.  
  299. static struct GfxLayout charlayout =
  300. {
  301.     8,8,    /* 8*8 characters */
  302.     512,    /* 512 characters */
  303.     2,    /* 2 bits per pixel */
  304.     { 0, 4 },    /* the two bitplanes for 4 pixels are packed into one byte */
  305.     { 3, 2, 1, 0, 0x1000*8+3, 0x1000*8+2, 0x1000*8+1, 0x1000*8+0 },
  306.     { 7*8, 6*8, 5*8, 4*8, 3*8, 2*8, 1*8, 0*8 },
  307.     8*8    /* every char takes 8 consecutive bytes */
  308. };
  309. static struct GfxLayout tilelayout =
  310. {
  311.     16,16,    /* 16*16 characters */
  312.     256,    /* 256 characters */
  313.     4,    /* 4 bits per pixel */
  314.     { 0, 4, 0x8000*8+0, 0x8000*8+4 },    /* the two bitplanes for 4 pixels are packed into one byte */
  315.     { 3, 2, 1, 0, 0x2000*8+3, 0x2000*8+2, 0x2000*8+1, 0x2000*8+0,
  316.             16*8+3, 16*8+2, 16*8+1, 16*8+0, 16*8+0x2000*8+3, 16*8+0x2000*8+2, 16*8+0x2000*8+1, 16*8+0x2000*8+0 },
  317.     { 15*8, 14*8, 13*8, 12*8, 11*8, 10*8, 9*8, 8*8,
  318.             7*8, 6*8, 5*8, 4*8, 3*8, 2*8, 1*8, 0*8 },
  319.     32*8    /* every char takes 32 consecutive bytes */
  320. };
  321. static struct GfxLayout spritelayout =
  322. {
  323.     16,16,    /* 16*16 sprites */
  324.     1024,    /* 1024 sprites */
  325.     4,    /* 4 bits per pixel */
  326.     { 0, 1024*16*16, 2*1024*16*16, 3*1024*16*16 },    /* the bitplanes are separated */
  327.     { 7, 6, 5, 4, 3, 2, 1, 0,
  328.             16*8+7, 16*8+6, 16*8+5, 16*8+4, 16*8+3, 16*8+2, 16*8+1, 16*8+0 },
  329.     { 15*8, 14*8, 13*8, 12*8, 11*8, 10*8, 9*8, 8*8,
  330.             7*8, 6*8, 5*8, 4*8, 3*8, 2*8, 1*8, 0*8 },
  331.     32*8    /* every sprite takes 32 consecutive bytes */
  332. };
  333.  
  334. static struct GfxDecodeInfo gfxdecodeinfo[] =
  335. {
  336.     { REGION_GFX1, 0x00000, &charlayout,                0, 16 },
  337.     { REGION_GFX2, 0x00000, &tilelayout,             16*4,  4 },
  338.     { REGION_GFX2, 0x04000, &tilelayout,             16*4,  4 },
  339.     { REGION_GFX2, 0x10000, &tilelayout,             16*4,  4 },
  340.     { REGION_GFX2, 0x14000, &tilelayout,             16*4,  4 },
  341.     { REGION_GFX3, 0x00000, &tilelayout,        16*4+4*16,  4 },
  342.     { REGION_GFX3, 0x04000, &tilelayout,        16*4+4*16,  4 },
  343.     { REGION_GFX3, 0x10000, &tilelayout,        16*4+4*16,  4 },
  344.     { REGION_GFX3, 0x14000, &tilelayout,        16*4+4*16,  4 },
  345.     { REGION_GFX4, 0x00000, &spritelayout, 16*4+4*16+4*16,  4 },
  346.     { -1 } /* end of array */
  347. };
  348.  
  349.  
  350.  
  351. static struct YM3526interface ym3526_interface =
  352. {
  353.     1,            /* 1 chip (no more supported) */
  354.     3600000,    /* 3.600000 MHz ? */
  355.     { 100 }        /* volume */
  356. };
  357.  
  358. static struct MSM5205interface msm5205_interface =
  359. {
  360.     1,                    /* 1 chip             */
  361.     384000,                /* 384KHz ?           */
  362.     { firetrap_adpcm_int },/* interrupt function */
  363.     { MSM5205_S48_4B},    /* 8KHz ?             */
  364.     { 60 }
  365. };
  366.  
  367.  
  368.  
  369. static struct MachineDriver machine_driver_firetrap =
  370. {
  371.     /* basic machine hardware */
  372.     {
  373.         {
  374.             CPU_Z80,
  375.             6000000,    /* 6 Mhz */
  376.             readmem,writemem,0,0,
  377.             nmi_interrupt,1
  378.         },
  379.         {
  380.             CPU_M6502 | CPU_AUDIO_CPU,
  381.             3072000/2,    /* 1.536 Mhz? */
  382.             sound_readmem,sound_writemem,0,0,
  383.             ignore_interrupt,0
  384.                             /* IRQs are caused by the ADPCM chip */
  385.                             /* NMIs are caused by the main CPU */
  386.         },
  387.     },
  388.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  389.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  390.     0,
  391.  
  392.     /* video hardware */
  393.     32*8, 32*8, { 0*8, 32*8-1, 1*8, 31*8-1 },
  394.     gfxdecodeinfo,
  395.     256+1,16*4+4*16+4*16+4*16,
  396.     firetrap_vh_convert_color_prom,
  397.  
  398.     VIDEO_TYPE_RASTER,
  399.     0,
  400.     firetrap_vh_start,
  401.     firetrap_vh_stop,
  402.     firetrap_vh_screenrefresh,
  403.  
  404.     /* sound hardware */
  405.     0,0,0,0,
  406.     {
  407.         {
  408.             SOUND_YM3526,
  409.             &ym3526_interface
  410.         },
  411.         {
  412.             SOUND_MSM5205,
  413.             &msm5205_interface
  414.         }
  415.     }
  416. };
  417.  
  418.  
  419.  
  420. /***************************************************************************
  421.  
  422.   Game driver(s)
  423.  
  424. ***************************************************************************/
  425.  
  426. ROM_START( firetrap )
  427.     ROM_REGION( 0x20000, REGION_CPU1 )    /* 64k for code + 64k for banked ROMs */
  428.     ROM_LOAD( "di02.bin",     0x00000, 0x8000, 0x3d1e4bf7 )
  429.     ROM_LOAD( "di01.bin",     0x10000, 0x8000, 0x9bbae38b )
  430.     ROM_LOAD( "di00.bin",     0x18000, 0x8000, 0xd0dad7de )
  431.  
  432.     ROM_REGION( 0x18000, REGION_CPU2 )    /* 64k for the sound CPU + 32k for banked ROMs */
  433.     ROM_LOAD( "di17.bin",     0x08000, 0x8000, 0x8605f6b9 )
  434.     ROM_LOAD( "di18.bin",     0x10000, 0x8000, 0x49508c93 )
  435.  
  436.     /* there's also a protected 8751 microcontroller with ROM onboard */
  437.  
  438.     ROM_REGION( 0x02000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  439.     ROM_LOAD( "di03.bin",     0x00000, 0x2000, 0x46721930 )    /* characters */
  440.  
  441.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  442.     ROM_LOAD( "di06.bin",     0x00000, 0x8000, 0x441d9154 )    /* tiles */
  443.     ROM_LOAD( "di07.bin",     0x08000, 0x8000, 0xef0a7e23 )
  444.     ROM_LOAD( "di04.bin",     0x10000, 0x8000, 0x8e6e7eec )
  445.     ROM_LOAD( "di05.bin",     0x18000, 0x8000, 0xec080082 )
  446.  
  447.     ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  448.     ROM_LOAD( "di09.bin",     0x00000, 0x8000, 0xd11e28e8 )
  449.     ROM_LOAD( "di11.bin",     0x08000, 0x8000, 0x6424d5c3 )
  450.     ROM_LOAD( "di08.bin",     0x10000, 0x8000, 0xc32a21d8 )
  451.     ROM_LOAD( "di10.bin",     0x18000, 0x8000, 0x9b89300a )
  452.  
  453.     ROM_REGION( 0x20000, REGION_GFX4 | REGIONFLAG_DISPOSE )
  454.     ROM_LOAD( "di16.bin",     0x00000, 0x8000, 0x0de055d7 )    /* sprites */
  455.     ROM_LOAD( "di13.bin",     0x08000, 0x8000, 0x869219da )
  456.     ROM_LOAD( "di14.bin",     0x10000, 0x8000, 0x6b65812e )
  457.     ROM_LOAD( "di15.bin",     0x18000, 0x8000, 0x3e27f77d )
  458.  
  459.     ROM_REGION( 0x0200, REGION_PROMS )
  460.     ROM_LOAD( "firetrap.3b",  0x0000, 0x100, 0x8bb45337 ) /* palette red and green component */
  461.     ROM_LOAD( "firetrap.4b",  0x0100, 0x100, 0xd5abfc64 ) /* palette blue component */
  462. ROM_END
  463.  
  464. ROM_START( firetpbl )
  465.     ROM_REGION( 0x28000, REGION_CPU1 )    /* 64k for code + 96k for banked ROMs */
  466.     ROM_LOAD( "ft0d.bin",     0x00000, 0x8000, 0x793ef849 )
  467.     ROM_LOAD( "ft0c.bin",     0x10000, 0x8000, 0x5c8a0562 )
  468.     ROM_LOAD( "ft0b.bin",     0x18000, 0x8000, 0xf2412fe8 )
  469.     ROM_LOAD( "ft0a.bin",     0x08000, 0x8000, 0x613313ee )    /* unprotection code */
  470.  
  471.     ROM_REGION( 0x18000, REGION_CPU2 )    /* 64k for the sound CPU + 32k for banked ROMs */
  472.     ROM_LOAD( "di17.bin",     0x08000, 0x8000, 0x8605f6b9 )
  473.     ROM_LOAD( "di18.bin",     0x10000, 0x8000, 0x49508c93 )
  474.  
  475.     ROM_REGION( 0x02000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  476.     ROM_LOAD( "ft0e.bin",     0x00000, 0x2000, 0xa584fc16 )    /* characters */
  477.  
  478.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  479.     ROM_LOAD( "di06.bin",     0x00000, 0x8000, 0x441d9154 )    /* tiles */
  480.     ROM_LOAD( "di07.bin",     0x08000, 0x8000, 0xef0a7e23 )
  481.     ROM_LOAD( "di04.bin",     0x10000, 0x8000, 0x8e6e7eec )
  482.     ROM_LOAD( "di05.bin",     0x18000, 0x8000, 0xec080082 )
  483.  
  484.     ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  485.     ROM_LOAD( "di09.bin",     0x00000, 0x8000, 0xd11e28e8 )
  486.     ROM_LOAD( "di11.bin",     0x08000, 0x8000, 0x6424d5c3 )
  487.     ROM_LOAD( "di08.bin",     0x10000, 0x8000, 0xc32a21d8 )
  488.     ROM_LOAD( "di10.bin",     0x18000, 0x8000, 0x9b89300a )
  489.  
  490.     ROM_REGION( 0x20000, REGION_GFX4 | REGIONFLAG_DISPOSE )
  491.     ROM_LOAD( "di16.bin",     0x00000, 0x8000, 0x0de055d7 )    /* sprites */
  492.     ROM_LOAD( "di13.bin",     0x08000, 0x8000, 0x869219da )
  493.     ROM_LOAD( "di14.bin",     0x10000, 0x8000, 0x6b65812e )
  494.     ROM_LOAD( "di15.bin",     0x18000, 0x8000, 0x3e27f77d )
  495.  
  496.     ROM_REGION( 0x0200, REGION_PROMS )
  497.     ROM_LOAD( "firetrap.3b",  0x0000, 0x100, 0x8bb45337 ) /* palette red and green component */
  498.     ROM_LOAD( "firetrap.4b",  0x0100, 0x100, 0xd5abfc64 ) /* palette blue component */
  499. ROM_END
  500.  
  501.  
  502.  
  503. GAMEX(1986, firetrap, 0,        firetrap, firetrap, 0, ROT90, "Data East USA", "Fire Trap", GAME_NOT_WORKING )
  504. GAME( 1986, firetpbl, firetrap, firetrap, firetrap, 0, ROT90, "bootleg", "Fire Trap (Japan bootleg)" )
  505.